import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useSystemStore = defineStore(
  'system',
  () => {
    const statusBarHeight = ref(20)

    const setStatusBarHeight = (height) => {
      if (typeof height === 'number' && height > 0) {
        statusBarHeight.value = height
      }
    }

    return {
      statusBarHeight,
      setStatusBarHeight
    }
  },
  {
    persist: {
      key: 'system',
      paths: ['statusBarHeight']
    }
  }
)

